package com.jk.service.impl;

import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

import com.jk.util.OSSClientUtil;

@Service("upImgService")
public class UpImgServiceImpl implements UpImgService {
    public String updateHead(MultipartFile file){
        OSSClientUtil ossClient=new OSSClientUtil();
        String name = ossClient.uploadImg2Oss(file);
        String imgUrl = ossClient.getImgUrl(name);
        String[] split = imgUrl.split("\\?");
        return split[0];
    }
} 